<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

$app->get('/', function () use ($app) {
    return $app->version();
});

$app->get('/temp_build','XuangouDugController@buildAccount');

//$app->get('{hash}',['as'=>'getFile','uses'=>'FileController@rendering']);
//$app->post('upload', 'FileController@puting');
//$app->get('batch', 'FileController@batch');

$app->get('debug','XuangouDugController@debug');

$app->post('login','XuangouDugController@userLogin'); //用户登录
$app->get('home_data','XuangouDugController@homeData'); //首页数据
$app->get('goods_info','XuangouDugController@goodsInfo'); //商品详情
$app->get('user_info','XuangouDugController@getUserInfo'); //获取用户信息
$app->post('add_cart','XuangouDugController@addCart'); //加入购物车
$app->get('cart_info','XuangouDugController@getCartInfo'); //购物车信息
$app->get('buy_sku_info','XuangouDugController@buySkuInfo'); //直接购买商品信息
$app->get('buy_cart_info','XuangouDugController@buyCartInfo'); //购物车购买商品信息
$app->post('cart_update','XuangouDugController@updateCartGoodsNumber'); //购物车更新
$app->post('cart_delete','XuangouDugController@deleteCartGoods'); //购物车删除
$app->post('create_order','XuangouDugController@createOrder'); //创建订单
$app->get('order_info','XuangouDugController@orderInfo'); //订单详情
$app->get('order_list','XuangouDugController@orderList'); //订单列表
$app->get('address_list','XuangouDugController@addressList'); //收货地址列表
$app->get('address_info','XuangouDugController@addressInfo'); //地址详情
$app->post('address_update','XuangouDugController@updateAddress'); //地址修改
